/*
 * XML Type:  XVersion
 * Namespace: http://www.seedwill.com/xul/core
 * Java type: com.seedwill.xul.core.XVersion
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.core.impl;
/**
 * An XML XVersion(@http://www.seedwill.com/xul/core).
 *
 * This is a complex type.
 */
public class XVersionImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.seedwill.xul.core.XVersion
{
    private static final long serialVersionUID = 1L;
    
    public XVersionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MAJORREVISION$0 = 
        new javax.xml.namespace.QName("", "majorRevision");
    private static final javax.xml.namespace.QName MINORREVISION$2 = 
        new javax.xml.namespace.QName("", "minorRevision");
    private static final javax.xml.namespace.QName MAJOR$4 = 
        new javax.xml.namespace.QName("", "major");
    private static final javax.xml.namespace.QName MINOR$6 = 
        new javax.xml.namespace.QName("", "minor");
    private static final javax.xml.namespace.QName BUILD$8 = 
        new javax.xml.namespace.QName("", "build");
    private static final javax.xml.namespace.QName REVISION$10 = 
        new javax.xml.namespace.QName("", "revision");
    
    
    /**
     * Gets the "majorRevision" element
     */
    public short getMajorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAJORREVISION$0, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getShortValue();
        }
    }
    
    /**
     * Gets (as xml) the "majorRevision" element
     */
    public org.apache.xmlbeans.XmlShort xgetMajorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlShort target = null;
            target = (org.apache.xmlbeans.XmlShort)get_store().find_element_user(MAJORREVISION$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "majorRevision" element
     */
    public void setMajorRevision(short majorRevision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAJORREVISION$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAJORREVISION$0);
            }
            target.setShortValue(majorRevision);
        }
    }
    
    /**
     * Sets (as xml) the "majorRevision" element
     */
    public void xsetMajorRevision(org.apache.xmlbeans.XmlShort majorRevision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlShort target = null;
            target = (org.apache.xmlbeans.XmlShort)get_store().find_element_user(MAJORREVISION$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlShort)get_store().add_element_user(MAJORREVISION$0);
            }
            target.set(majorRevision);
        }
    }
    
    /**
     * Gets the "minorRevision" element
     */
    public short getMinorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINORREVISION$2, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getShortValue();
        }
    }
    
    /**
     * Gets (as xml) the "minorRevision" element
     */
    public org.apache.xmlbeans.XmlShort xgetMinorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlShort target = null;
            target = (org.apache.xmlbeans.XmlShort)get_store().find_element_user(MINORREVISION$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "minorRevision" element
     */
    public boolean isSetMinorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MINORREVISION$2) != 0;
        }
    }
    
    /**
     * Sets the "minorRevision" element
     */
    public void setMinorRevision(short minorRevision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINORREVISION$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINORREVISION$2);
            }
            target.setShortValue(minorRevision);
        }
    }
    
    /**
     * Sets (as xml) the "minorRevision" element
     */
    public void xsetMinorRevision(org.apache.xmlbeans.XmlShort minorRevision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlShort target = null;
            target = (org.apache.xmlbeans.XmlShort)get_store().find_element_user(MINORREVISION$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlShort)get_store().add_element_user(MINORREVISION$2);
            }
            target.set(minorRevision);
        }
    }
    
    /**
     * Unsets the "minorRevision" element
     */
    public void unsetMinorRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MINORREVISION$2, 0);
        }
    }
    
    /**
     * Gets the "major" element
     */
    public int getMajor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAJOR$4, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "major" element
     */
    public org.apache.xmlbeans.XmlInt xgetMajor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(MAJOR$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "major" element
     */
    public void setMajor(int major)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MAJOR$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAJOR$4);
            }
            target.setIntValue(major);
        }
    }
    
    /**
     * Sets (as xml) the "major" element
     */
    public void xsetMajor(org.apache.xmlbeans.XmlInt major)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(MAJOR$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(MAJOR$4);
            }
            target.set(major);
        }
    }
    
    /**
     * Gets the "minor" element
     */
    public int getMinor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINOR$6, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "minor" element
     */
    public org.apache.xmlbeans.XmlInt xgetMinor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(MINOR$6, 0);
            return target;
        }
    }
    
    /**
     * True if has "minor" element
     */
    public boolean isSetMinor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MINOR$6) != 0;
        }
    }
    
    /**
     * Sets the "minor" element
     */
    public void setMinor(int minor)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MINOR$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINOR$6);
            }
            target.setIntValue(minor);
        }
    }
    
    /**
     * Sets (as xml) the "minor" element
     */
    public void xsetMinor(org.apache.xmlbeans.XmlInt minor)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(MINOR$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(MINOR$6);
            }
            target.set(minor);
        }
    }
    
    /**
     * Unsets the "minor" element
     */
    public void unsetMinor()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MINOR$6, 0);
        }
    }
    
    /**
     * Gets the "build" element
     */
    public int getBuild()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BUILD$8, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "build" element
     */
    public org.apache.xmlbeans.XmlInt xgetBuild()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(BUILD$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "build" element
     */
    public boolean isSetBuild()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BUILD$8) != 0;
        }
    }
    
    /**
     * Sets the "build" element
     */
    public void setBuild(int build)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BUILD$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(BUILD$8);
            }
            target.setIntValue(build);
        }
    }
    
    /**
     * Sets (as xml) the "build" element
     */
    public void xsetBuild(org.apache.xmlbeans.XmlInt build)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(BUILD$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(BUILD$8);
            }
            target.set(build);
        }
    }
    
    /**
     * Unsets the "build" element
     */
    public void unsetBuild()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BUILD$8, 0);
        }
    }
    
    /**
     * Gets the "revision" element
     */
    public int getRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REVISION$10, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "revision" element
     */
    public org.apache.xmlbeans.XmlInt xgetRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(REVISION$10, 0);
            return target;
        }
    }
    
    /**
     * True if has "revision" element
     */
    public boolean isSetRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REVISION$10) != 0;
        }
    }
    
    /**
     * Sets the "revision" element
     */
    public void setRevision(int revision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REVISION$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REVISION$10);
            }
            target.setIntValue(revision);
        }
    }
    
    /**
     * Sets (as xml) the "revision" element
     */
    public void xsetRevision(org.apache.xmlbeans.XmlInt revision)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(REVISION$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(REVISION$10);
            }
            target.set(revision);
        }
    }
    
    /**
     * Unsets the "revision" element
     */
    public void unsetRevision()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REVISION$10, 0);
        }
    }
}
